﻿<navigation:Page xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"  x:Class="DeepTime.BootStrapper.Views.DeepZoomImages" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="DeepZoomImages Page">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <Style TargetType="Button">
                <Setter Property="Height" Value="50" />
                <Setter Property="Width" Value="100" />
                <Setter Property="Margin" Value="0,0,5,0" />
            </Style>
        </Grid.Resources>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition/>
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <!--<Button Content="Refresh" Click="Button_Click_1"  HorizontalAlignment="Left" VerticalAlignment="Top" />-->
        </StackPanel>

        <ListBox Name="lbImages" Grid.Row="1" ItemsSource="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel VerticalAlignment="Center">
                        <!--<TextBlock Text="{Binding BlobUri}" />-->
                        <MultiScaleImage HorizontalAlignment="Left" Name="msiImage" Source="{Binding Path=DeepZoomImage}" Grid.Row="1" Height="200" Width="200" />
                        <Button Click="Button_Click_2" Content="View DeepZoom"  HorizontalAlignment="Left" Width="Auto"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <my:WrapPanel />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
        </ListBox>
    </Grid>
</navigation:Page>
